<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>
  <meta charset="UTF-8">
  <title>header</title>
  <link href="../../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
  <script src="../../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
  <script src="../../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
</head>
<body>

<div class="container" th:fragment="header">
  <nav class="navbar navbar-expand-lg navbar-light bg-light">
    <div class="container-fluid">
      <a class="navbar-brand" href="/">Home</a>
      <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav me-auto mb-2 mb-lg-0">
          <li class="nav-item">
            <a class="nav-link active" aria-current="page" href="/users">Users</a>
          </li>
        </ul>
        <div sec:authorize="isAuthenticated()" class="d-flex navbar-nav">
          <a class="nav-link" href="#" th:href="|/profile|">Profile</a>
          <a class="nav-link" href="#" th:href="|/logout|">Logout</a>
        </div>
        <div sec:authorize="isAnonymous()" class="d-flex navbar-nav">
          <a class="nav-link" href="#" th:href="|/login|">Login</a>
        </div>
      </div>
    </div>
  </nav>
</div>

</body>
</html>